<template>
	<div class="header">
		<header class="fixed_top" :class=" this.$store.getters.isIphoneX ? 'iphoneX' : '' "><a @click="back()" class="back"></a><span>{{tt}}</span></header>
	</div>
</template>

<script type="text/javascript">
	export default{
		name:"backHeader",
        props:['title'],
        data(){
            return {
                tt:""
            }
        },
        beforeMount(){
            this.getTitle();
        },
        methods:{
            back(){
                this.$router.go(-1)
            },
            getTitle(){
                this.tt = this.title
            }
        }
	}
</script>
<style lang="less" scoped>
.header{
    width:100%;
}
.fixed_top {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10;
    width: 100%;
    height: 50px;
    text-align: center;
    background: url(../assets/images/gerenzhongxinbeijing.png) no-repeat top center;
    background-size: 100%;
    font-size: 0;
    line-height: 50px
}

.fixed_top .back {
    position: absolute;
    top: 5px;
    left: 0;
    display: block;
    width: 40px;
    height: 40px;
    background: url(../assets/images/fanhuijian.png) no-repeat center;
    background-size: 12px;
    vertical-align: middle;
}
.fixed_top span {
    vertical-align: middle;
    font-size: 16px;
    color: #060606
}
.fixed_top.iphoneX {
    height: 80px;
}
.fixed_top.iphoneX .back{
    top: 40px;
}
.fixed_top.iphoneX span{
    line-height: 120px;
}
</style>